package top.huxy.boot.controller.admin;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.huxy.boot.annotation.RequestRemake;
import top.huxy.boot.model.dto.Pager;
import top.huxy.boot.model.dto.Query;
import top.huxy.boot.service.ScheduleLogService;
import top.huxy.boot.util.obj.Result;

/**
 * @Classname ScheduleLogController
 * @Description ScheduleLogController
 * @Date 2021/9/19 12:48
 * @Created by huxy
 */
@RestController
@RequestMapping("/admin/scheduleLog")
public class ScheduleLogController {

    ScheduleLogService scheduleLogService;

    public ScheduleLogController(ScheduleLogService scheduleLogService) {
        this.scheduleLogService = scheduleLogService;
    }

    @GetMapping("/getScheduleLogList")
    @RequestRemake("获取任务日志列表")
    public Result getScheduleLogList(Pager pager, Query query){
        return Result.success(scheduleLogService.getScheduleLogListByFilter(pager,query));
    }

    @GetMapping("/getScheduleLogJobIds")
    @RequestRemake("获取任务日志id")
    public Result getScheduleLogJobIds(){
        return Result.success(scheduleLogService.getScheduleLogJobIds());
    }
}
